package com.shop.rabbit.rabbitmq.consumer;

import cn.common.constant.RabbitConstants;
import com.shop.rabbit.business.EntrustBalanceBusiness;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Slf4j
@Component
@RabbitListener(queues = {RabbitConstants.ENTRUST_BALANCE_QUEUE_PUT})
public class EntrustBalanceConsumer {

    @Autowired
    private EntrustBalanceBusiness entrustBalanceBusiness;
    @RabbitHandler
    public void process(String message) {
        entrustBalanceBusiness.execute(message);
    }
}
